#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

#include "drv_gpio.h"
#include "drv_leds.h"

//init des leds

//Init leds
int InitLeds ( void )
{
	drv_gpioExport(LED_RED);
	drv_gpioSetDir(LED_RED,"out");
	drv_gpioExport(LED_GREEN1);
	drv_gpioSetDir(LED_GREEN1,"out");
	drv_gpioExport(LED_GREEN2);
	drv_gpioSetDir(LED_GREEN2,"out");
	drv_gpioExport(LED_GREEN3);
	drv_gpioSetDir(LED_GREEN3,"out");	

	LedOff(LED_RED);
	LedOff(LED_GREEN1);
	LedOff(LED_GREEN2);
	LedOff(LED_GREEN3);
	return 1; 
}


void LedOn ( int led_id )
{
	drv_gpioClearBits(led_id);
}

void LedOff ( int led_id )
{
	drv_gpioSetBits(led_id);
}

void LedToggle ( int led_id )
{
	drv_gpioToggleBits(led_id);
}
